package com.diaohw.module.metadata.obj.convert;

import com.diaohw.module.metadata.obj.dto.MetaGroupDTO;
import com.diaohw.module.metadata.obj.entity.MetaGroupDO;
import com.diaohw.module.metadata.obj.vo.MetaGroupVO;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * <p>
 * 元数据分组 类型转换
 * </p>
 *
 * @author D-Hw
 * @since 2025-04-07
 */
@Mapper
public interface MetaGroupConvert {

    MetaGroupConvert INSTANCE = Mappers.getMapper(MetaGroupConvert.class);

    /**
     * dto to entity
     */
    @InheritConfiguration
    MetaGroupDO dtoToEntity(MetaGroupDTO dto);

    /**
     * entity to dto
     */
    @InheritConfiguration
    MetaGroupDTO entityToDto(MetaGroupDO entity);

    /**
     * entity to dto
     */
    @InheritConfiguration
    MetaGroupVO entityToVo(MetaGroupDO entity);

    /**
     * entity to dto
     */
    @InheritConfiguration
    List<MetaGroupVO> entityToVo(List<MetaGroupDO> list);


}

